#ifndef STRUCTURES_H_
# define STRUCTURES_H_

# include <stdlib.h>
# include <unistd.h>
# include <stdio.h>
# include <curses.h>
# include "constantes.h"

typedef struct s_context	*p_context;
/* playlist : circular double linked list */
typedef struct s_playlist	*p_playlist;
typedef struct s_media		*p_media;

struct				s_context
{
  int				col;
  int				line;
  int				nb_win;
  int				color;
  int				color_bg;
  int				height_font;
  int				width_font;
  int				is_frame; /* display frame ? */
  int				focus; /* focused window */
  int				video_limits[4]; /* grepme */
  int				font_size;
  int				nb_display_files;
  int				height[MAX_WIN];
  int				width[MAX_WIN];
  int				side[MAX_WIN];
  char				*name[MAX_WIN];
  char				*descr[MAX_WIN];
  MEVENT			mouse;
  WINDOW			*win[MAX_WIN];
  WINDOW			*explorer_files[MAX_NB_EXPLORER_FILES];
  char				*explorer_filename[MAX_NB_EXPLORER_FILES];
};

struct				s_playlist
{
  p_media			media;
  int				nb_media;
  char				*name;
};

struct				s_media
{
  int				type;
  int				rate;
  int				score;
  int				nb_played;
  char				*name;
  char				*thumb;
  char				*lyrics;
  int				duration;
  p_media			next;
  p_media			prev;
  p_media			last;
};


#endif /* !STRUCTURES_H_ */
